menuList[3].onclick();




// 提醒是否通过的操作
function openSubmitPassFun(){
    pointFun({
        code:5,
        msg:"是否通过该店铺的审核"
    })
}
// 通过的操作
function submitPassFun(e){
    e=e || window.event;
    var target=e.target || e.srcElement;
    let introduction  = cl("introduction");
    let passBtn  = document.getElementById("passBtn");
    axios({
        url:'/admin/store/passAShop',
        method:'POST',
        params:{
            userId:passBtn.getAttribute('name'),
            introduction: introduction.innerHTML.trim(),
            shopName: passBtn.getAttribute('shopName')
            }
        })
        .then(data => {
            console.log(data.data);
            explain({
                code:1,
                msg:"提交成功",
                time:3000
            })
        })
        .catch(err => {
            console.log(err);
        })
    
}
// 打开拒绝的操作
function openRefuseWin(){
    let covers = cl("covers");
    let reasonWin = cl("reasonWin");
    reasonWin.style.display="block";
    covers.style.display="block";
}
// 提交拒绝信息
function submitRefuseFun(){ 
    let reasonWrap = cl("reasonWrap");
    let businessId = document.getElementById("businessId")
    let content = reasonWrap.value;
    if(content.trim().length==0){
        explain({
            code:3,
            msg:"拒绝信息不能为空",
            time:3000
        })
    }else{
        axios({
            url:'/admin/store/refuseAShop',
            method:'PATCH',
            params:{
                bussinessId:businessId.getAttribute("name"),
                reason:content
                }
            })
            .then(data => {
                console.log(data.data);
                explain({
                    code:1,
                    msg:"提交成功",
                    time:3000
                })
            })
            .catch(err => {
                console.log(err);
            })
       
        closeReasonWin();
    }
}
// 点击返回上一页
function returnFun(){
    window.history.back();  
}
// 关闭窗口
function closeReasonWin(){
    alertWindow = document.getElementsByClassName("alertWindow")[0];
    alertWindow.style.display = "none";
    let covers = cl("covers");
    let reasonWin = cl("reasonWin");
    reasonWin.style.display="none";
    covers.style.display="none";
}